package cn.dw.domain;

import java.util.List;

@SuppressWarnings("rawtypes")
public class PageBean {
	private int currentPage;
	private int totalCount;
	private int pageSize = 10;
	private int totalPage;

	private List list;

	public int getIndex() {
		return (this.currentPage - 1) * this.pageSize;
	}

	public PageBean(int currentPage, int totalCount) {
		this.currentPage = currentPage;
		this.totalCount = totalCount;

		this.totalPage = ((totalCount + this.pageSize - 1) / this.pageSize);
	}

	public int getCurrentPage() {
		return this.currentPage;
	}

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}

	public int getTotalCount() {
		return this.totalCount;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}

	public int getPageSize() {
		return this.pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getTotalPage() {
		return this.totalPage;
	}

	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}

	public List getList() {
		return this.list;
	}

	public void setList(List list) {
		this.list = list;
	}
}
